<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="Author" CONTENT="Joshua Neal">
   <META NAME="Description" CONTENT="Pure VGA/SVGA hardware programming (registers, identification, and otherlow-level stuff.)">
   <META NAME="KeyWords" CONTENT="VGA SVGA hardware video programming">
   <TITLE>FreeVGA Project Home - Hardware level VGA and SVGA programming info</TITLE>
</HEAD>
<BODY>

<CENTER><A HREF="home.htm">Home</A> <A HREF="#news">News</A> <A HREF="#mirrors">Mirrors</A>
<A HREF="#preface">Preface</A> <A HREF="#background">Background</A> <A HREF="#vga">VGA</A>
<A HREF="#svga">SVGA</A> <A HREF="#tricks">Tricks</A> <A HREF="#references">Links</A>
<A HREF="#warn">Disclaimer</A> <A HREF="#product">Products</A> <A HREF="#feedback">Feedback</A>
<A HREF="home.htm">Back</A>&nbsp;
<HR><B>Hardware Level VGA and SVGA Video Programming Information Page</B></CENTER>

<CENTER>Home&nbsp;
<HR WIDTH="100%"></CENTER>

<CENTER>&nbsp;</CENTER>

<CENTER><TABLE BORDER WIDTH="600" CELLPADING="2" >
<TR ALIGN=CENTER VALIGN=CENTER>
<TD WIDTH="75">7</TD>

<TD WIDTH="75">6</TD>

<TD WIDTH="75">5</TD>

<TD WIDTH="75">4</TD>

<TD WIDTH="75">3</TD>

<TD WIDTH="75">2</TD>

<TD WIDTH="75">1</TD>

<TD WIDTH="75">0</TD>
</TR>

<TR ALIGN=CENTER VALIGN=CENTER>
<TD WIDTH="75"><FONT SIZE=+4>F</FONT></TD>

<TD WIDTH="75"><FONT SIZE=+4>R</FONT></TD>

<TD WIDTH="75"><FONT SIZE=+4>E</FONT></TD>

<TD WIDTH="75"><FONT SIZE=+4>E</FONT></TD>

<TD WIDTH="75"><FONT SIZE=+4>&nbsp;</FONT></TD>

<TD WIDTH="75"><FONT SIZE=+4>V</FONT></TD>

<TD WIDTH="75"><FONT SIZE=+4>G</FONT></TD>

<TD WIDTH="75"><FONT SIZE=+4>A</FONT></TD>
</TR>
</TABLE></CENTER>

<CENTER>This page is home to the <A HREF="freevga.htm">FreeVGA Project</A>
-- dedicated to providing a totally FREE source of information about video
hardware.&nbsp; <A HREF="freevga.htm">Additional goals/information are
located here.</A></CENTER>

<CENTER>"Keep on rocking in the free world." - Neil Young</CENTER>


<P><A NAME="news"></A><B>Latest News</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 08/01/1998</B> -- More
information is now up, including a large portion of the "standard" VGA
reference.&nbsp; Some other minor changes have been made to other information.&nbsp;
Expect more updates in the not too far future.

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>06/20/1998</B> -- The
work contiues.&nbsp; Added three new mirrors.&nbsp; Some of the information
that was located in the VGA reference, but really applies to video programming
in general has been moved to the new Background Information (formerly Introduction)
section of this page, and has been released.&nbsp; Also, a glossary has
been added defining terms related to video programming, but is not very
comprehensive at the moment, although this should improve over time. Many
minor corrections have been made to the released material after being pointed
out by the insightful people reading the information.&nbsp; Thank you!

<P><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 06/08/1998</B> -- The
mirror list has been updated with the new entries. Special thanks goes
out to all those who have donated their personal resources to advance the
project's goals.&nbsp; Also, the first section of *real* information is
online, the low-level programming introduction.&nbsp; This section has
been relatively stable for quite some time, and seems to be releasable.&nbsp;
It is my goal to release the information after it stabilizes, and has been
verified for accuracy.

<P><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 06/04/1998</B> --<B> </B>If
you are looking for the current work-in-progress, and have been given the
passwords for the archive for review purposes, it can be downloaded <A HREF="http://www.goodnet.com/~tinara/wip.zip">here</A>.&nbsp;
For those with current problems/questions that this page addresses, please
feel free to use the <A HREF="#feedback">Feedback Form</A> to contact the
author.&nbsp; If a link is marked with <B>(WIP)</B>, it is not posted online
and at this time is available only for review, upon request, and under
specific limitations.

<P><A NAME="mirrors"></A><B>Mirror Sites</B>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; At this time, the project
is experimenting with the feasibility of maintaining mirror sites to make
this information more widely available.&nbsp; The following mirror sites
are provided for your convenience.&nbsp; If you are interested in hosting
a mirror site of this information, please contact the author for more information.
If you are experiencing problems with any of these mirrors please use the
<A HREF="#feedback">Feedback Form</A> to contact the author, as it is likely
my fault that the problem has arisen.
<UL>
<LI>
<A HREF="http://www.goodnet.com/~tinara/FreeVGA/home.htm">USA, Arizona,
Phoenix</A> -- hosted by <A HREF="feedback.htm">Joshua Neal</A></LI>

<LI>
<A HREF="http://sf.znet.com/~vhold/FreeVGA/home.htm">USA, California, San
Francisco</A> -- hosted by <A HREF="http://sf.znet.com/~vhold/">Marty Price</A></LI>

<LI>
<A HREF="http://hardware.doa.org/FreeVGA/home.htm">USA, Massachusetts,
Boston</A> -- hosted by <A HREF="http://hardware.doa.org/">Leif Hardison</A></LI>

<LI>
<A HREF="http://www.pacwest.net/byron13/FreeVGA/home.htm">USA, Oregon,
Eugene</A> -- hosted by <A HREF="http://www.pacwest.net/byron13/">Byron
Miller</A></LI>

<LI>
<A HREF="http://hups.apana.org.au/~scuffer/FreeVGA/home.htm">Australia,
Canberra</A> -- hosted by <A HREF="http://hups.apana.org.au/~scuffer/">David
Murn</A></LI>

<LI>
<A HREF="http://nightmare.euroweb.hu/~ytiddo/FreeVGA/home.htm">Hungary</A>
-- hosted by <A HREF="http://nightmare.euroweb.hu/~ytiddo/">Justin Doiel</A></LI>

<LI>
<A HREF="http://www.inter.uunet.nl/hcc/S.Weijgers/FreeVGA/home.htm">The
Netherlands, Apeldoorn</A> -- hosted by <A HREF="http://web.inter.nl.net/hcc/S.Weijgers/">Simon
Weijgers</A></LI>

<LI>
<A HREF="http://n152.apeldoorn.telekabel.euronet.nl/FreeVGA/home.htm">The
Netherlands, Nijmegen</A> -- hosted by <A HREF="http://web.inter.nl.net/hcc/S.Weijgers/">Simon
Weijgers</A></LI>
</UL>
<A NAME="preface"></A><B>Preface</B>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This page's purpose is to
provide free low-level programming information to programmers interested
in the low-level details of programming the VGA and Super VGA adapters,
in a format independent of operating environment or programming language.
This page is not intended to be a reference to graphics or game programming
algorithms but rather a reference for those people attempting to implement
such algorithms in whatever environment they are using. This page is not
intended to be a showcase of web technology and thus will use HTML features
and graphics only when it is necessary to convey information. For example,
I have left the colors and fonts set to the default, so you can actually
use the default preferences in your browser. I am continuously adding material
to this page and have tried to incorporate links to other sites with valuable
information.
<UL>
<LI>
<A HREF="#intro">Introduction</A> -- An introduction to low-level programming</LI>

<LI>
<A HREF="#vga">Standard VGA Chipset Reference</A> -- Documents the common
functionality of all VGA and SVGA adapters.</LI>

<LI>
<A HREF="#svga">Super VGA Hardware Chipset Reference</A> -- Documents the
specifics of VGA and SVGA adapters.</LI>

<LI>
<A HREF="#other">Other Video Hardware Reference</A> -- Documents video
related hardware other than VGA and SVGA adapters.</LI>

<LI>
<A HREF="#tricks">Tricks and Techniques</A> -- Articles detailing the use
of low-level programming for optimization or special effects.</LI>

<LI>
<A HREF="#references">Other References</A> -- Gives pointers to other related
material.</LI>

<LI>
<A HREF="#warn">Warnings and Disclaimer</A> -- Reading this section before
utilizing any information contained within is both recommended and required.</LI>
</UL>
<A NAME="background"></A><B>Background Information</B>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Foremost, this page is meant
to be a place online where one can learn about low-level programming (If
everyone knew all of this information then this page would be redundant!)
This section contains general information that can be very helpful when
attempting to use the programming information located on this site.
<UL>
<LI>
<A HREF="llintro.htm">Introduction to Low-level Programming</A> -- Answers
general questions about the topic. <B>(Released 6/08/1998)</B></LI>

<LI>
<A HREF="hardovr.htm">Overview of Video Hardware Functionality</A> -- Describes
the job of the video hardware and what components it uses to perform that
task. <B>(Released 6/15/1998)</B></LI>

<LI>
<A HREF="vtiming.htm">Video Timing Information</A> -- Gives information
about video timing that is useful for video programmers.<B> (Released 6/15/98)</B></LI>

<LI>
<A HREF="glossary.htm">Video Programming Glossary</A> -- Defines terms
that are related to video programming. <B>(Added 6/15/1998)</B></LI>
</UL>
<A NAME="vga"></A><B>Standard VGA Chipset Reference</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </B>This section documents
the subset of functionality present on nearly all computers today. The
VGA BIOS utilizes only a fraction of the capability of the VGA hardware.
By programming the hardware at the lowest level, one gains the flexibility
to unleash the hardware's full potential.
<UL>
<LI>
<A HREF="vga/vga.htm">VGA Chipset Reference</A> -- Documentation of the
"Standard" VGA implementation. <B>(Released 8/01/1998)</B></LI>
</UL>
<A NAME="svga"></A><B>Super VGA Hardware Chipset Reference</B>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This section documents the
known functionality of specific VGA/SVGA chipsets. Because developers of
chipsets and video cards face incredible competition, they have added features
and functionality far beyond the standard VGA hardware. Unfortunately to
programmers, these features have been implemented differently in each particular
chipset, and even differently between products by the same manufacturer.
It is difficult to obtaining information on these chipsets and their implementations,
particularly so if the chipset is considered "obsolete" by the manufacturer.
Because of the open-ended nature of this topic (chipsets are under constant
development) this page will be updated constantly as new information becomes
available.
<UL>
<LI>
<A HREF="svga/svga.htm">SVGA Chipset Reference</A> -- Documentation of
specific VGA/SVGA hardware implementations. <B>(WIP)</B></LI>
</UL>
<A NAME="other"></A><B>Other Video Hardware Reference</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</B> This section is for
video hardware that does not specifically fit into the category of VGA
or SVGA, such as MPEG hardware, video capture hardware, non-integrated
3D accelerators, virtual reality gear, digital video cameras, stereoscopic
3D goggles, TV tuner cards, non-VGA compatible video adapters and the like.
This is another open-ended topic but is not the primary focus of this page.

<P><A NAME="tricks"></A><B>Tricks and Techniques</B>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This section contains useful
information on how to utilize the VGA/SVGA hardware to optimize specific
tasks or implement visual effects. Many of these techniques have been utilized
by game and demo programmers alike to push the envelope of the hardware's
capacity.
<UL>
<LI>
<A HREF="tricks/tricks.htm">Tricks and Techniques</A> -- Details on using
the hardware to your advantage. <B>(WIP)</B></LI>
</UL>
<A NAME="references"></A><B>Other References:</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </B>This section gives
some pointers to other available VGA hardware information available. Note
that they are listed here because
<UL>
<LI>
<B>Online Information</B></LI>

<UL>
<LI>
The <A HREF="http://www.heartlab.rri.uwo.ca/vidfaq/">COMP.SYS.IBM.PC.HARDWARE.VIDEO
Frequently Asked Questions (FAQ)</A> document, although not programming
oriented does contain much useful information about video hardware. The
site also includes links to nearly every vendor of video cards and monitors,
as well as links to pages covering monitor specifications. If you are looking
for video hardware related information not covered by the FreeVGA Project's
goals, you will likely find it or a link to it here.</LI>

<LI>
Finn Th&oslash;gersen's <A HREF="http://www.datashopper.dk/~finth/">VGADOC
&amp; WHATVGA Homepage</A> -- An excellent collection of information for
programming VGA and SVGA.</LI>

<LI>
Boone's <A HREF="http://www.strangecreations.com/library/hardware/vgaregs.txt">Programming
the VGA Registers</A> -- Contains a very sketchy "Documentation Over the
I/O Registers for Standard VGA Cards" by "Shaggy of The Yellow One." It
is free and distributable over the "Feel free to spread this to whoever
wants it....." licensing agreement.</LI>

<LI>
Andrew Scott's <I>VGA Programmers Master Reference Manual</I> (<A HREF="ftp://ftp.cdrom.com/pub/demos/code/hardware/video/vga-info.zip">click
here to download from ftp.cdrom.com</A>) -- A dated ('91) document that
is interesting if only because it attempts to document the VGA hardware
(actually the Trident TVGA8900 hardware) in a form useful for "writing
an applications specific BIOS." Begins with a very general description
the topic (a wordy definition of computation in general) and ends with
detailed register descriptions. Unfortunately, it lacks much material between
these areas. Worse, far from being a free resource, it requires shareware
registration fees that must be sent to the U.K. by means of a check drawn
from a U.K. bank only!</LI>

<LI>
Richard Wilton's <I>Programmer's Guide to PC and PS/2 Video Systems</I>
(<A HREF="http://www.dc.ee/Files/Programm.Docs/videoprg.arj">click here
to download from www.dc.ee</A>) An older reference, covers MDA, Hercules,
CGA, MCGA, and VGA. Not much VGA material but does have some register documentation.</LI>

<LI>
IBM's RS/6000 <I>CHRP I/O Device Reference</I> <A HREF="http://www.rs6000.ibm.com/resource/technology/chrpio/vga_app.mak.html">Appendix
A: VGA Programming Model</A> -- A good VGA reference from the makers of
the IBM VGA. Better than most on-line references as it contains programming
information in addition to a register description of the hardware; however
it is still vague in many areas. Especially interesting as it begins with
an acknowledgment of the many "clones" of the VGA hardware.</LI>

<LI>
Some brief VGA register info is available from the <A HREF="http://www.hitex.com/chipdir/reg/vga.txt">Chip
Directory</A>, also mirrored at other sites (see <A HREF="http://www.hitex.com/chipdir/">Chip
Directory home page</A>).</LI>

<LI>
Eric S. Raymond's <A HREF="http://sunsite.unc.edu/LDP/HOWTO/XFree86-Video-Timings-HOWTO.html">The
XFree86 Video Timings HOWTO</A> -- explains video mode and timing information
used in configuring XFree86 to support a given monitor, intended to be
used by the end user.&nbsp; Much of the information is not sepcific to
XFree86, and can be used by a programmer as an example of how a low-level
video routine can allow the end-users to setup video modes that pertain
to their monitors, as well as being useful to an end-user of such a program
attempting to configure such a routine to work with their monitors.</LI>

<LI>
Tomi Engdahl's <A HREF="http://www.hut.fi/Misc/Electronics/docs/">electronics
info page</A> has some information about video and vga timings, as well
as a section on VGA to TV converters and homemade circuitry.&nbsp; The
<A HREF="http://www.hut.fi/Misc/Electronics/circuits/vga2tv/cindex.html">VGA
to TV converter page</A> contans much information that pertains to driving
custom TV and monitors with a VGA or SVGA card that doesn't have the capability
built-in.</LI>
</UL>

<LI>
<B>Offline Information</B></LI>

<UL>
<LI>
Richard F. Ferraro's<B> </B><I>Programmer's Guide to the EGA, VGA, and
Super VGA Cards, Third Edition</I> -- A good text, one of the few good
books on a subject as broad and as complicated as low-level I/O.</LI>

<LI>
Frank van Gilluwe's <I>The Undocumented PC, Second Edition -- A Programmer's
Guide to I/O, CPUs and Fixed Memory Areas</I> -- An excellent book, which
is the likely the most complete PC technical reference ever written, and
includes 100+ pages of video programming information, although very little
VGA register information.</LI>

<LI>
Bertelsons, Rasch &amp; Hoffman's PC Underground: Unconventional Programming
Topics -- I bought this book on markdown, due to it having some VGA information
in it.&nbsp; I was surprised to find that not only did it have a register
description, but it also described some possible effects that can be done
with that register.</LI>
</UL>

<LI>
<B>Miscellaneous Information (Information not specific to video hardware,
but useful to video programmers.)</B></LI>

<UL>
<LI>
Norman Walsh's <A HREF="http://nwalsh.com/comp.fonts/FAQ/index.html">The
comp.fonts FAQ</A> -- An excellent resource on fonts, typefaces, and such.&nbsp;
Particularly helpful is the section on intellectual property protection
for fonts, as the copyright legality of fonts and typefaces is somewhat
confusing.&nbsp; Note -- Norman Walsh has ceased maintaining the FAQ, however,
this link will remain until a new version of the FAQ is produced.</LI>
</UL>
</UL>
<A NAME="product"></A><B>Product Recommendations</B>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The FreeVGA Project does
not make hardware recommendations as pertains to hardware covered by the
documentation, in an attempt to prevent any conflicts of interest.&nbsp;
However, there are other products that can be extremely helpful when implementing
the information found here, such as monitors, test equipment, and software.&nbsp;
I will not refuse any request to list a product on this page, however I
will categorize it depending upon its importance and suitability for video
related software development using opinions of myself and others.&nbsp;
If you disagree with the opinion here, please use the Feedback Form to
voice that opinion, such that it can be taken into account.
<UL>
<LI>
<A HREF="hardrec.htm">Product Recommendations</A> -- Listing of products
that can be beneficial to the target audience of this site.</LI>
</UL>
<A NAME="warn"></A><B>Warnings and Disclaimer</B>
<UL>
<LI>
<B><U>Danger</U>: </B>Monitors are designed to operate within certain frequency
ranges, or for fixed frequency monitors at certain frequencies.<B> <U>Driving
a monitor at a frequency that it is not designed for is not recommended
and may cause damage to the monitor's circuitry which can result in a fire
and safety risk</U>. </B>It is wise to know and understand the specifications
of the monitor(s) that you will be driving in order to prevent damage.
Consult the manufacturers documentation for the monitor for the information,
or if not available, contact the manufacturer directly.&nbsp; If the monitor
makes unusual noises, or the internal temperature exceeds the rated temperature
of its components, the monitor is likely to experience failure.&nbsp; This
failure may not be immediate, but is under most circumstances inevitable.&nbsp;<B>
<U>Monitor failures can be violent in nature, and can explode and produce
shrapnel, as well as overheat and catch fire</U>.&nbsp; </B>In no circumstance
should one leave a monitor unattended in an uncertain state.&nbsp; Furthermore,
exceeding the rated maximum frequencies of a monitor may cause the phosphors
to age prematurely, as well as<B> <U>increase the amount of harmful radiation
projected towards the viewer beyond the specified maximums</U>.</B></LI>

<LI>
<B><U>Warning</U>: </B>Clock chips and RAMDACs as well as other components
of the video card are designed with a maximum frequency.<B> <U>Programming
these chips to operate at a frequency greater than they were designed for
causes the chips to run hotter than they were designed to operate, and
may cause the component to fail</U>. </B>It is wise to know and understand
the maximum operating frequency of the components of any video subsystem
you will be programming. Do not assume that the component is safe to operate
at a particular frequency because it can be programmed to operate at that
frequency.&nbsp; The rated frequencies are rated and verified according
to batch yield.&nbsp; As clock frequencies increase, the failure rate of
the chips during manufacturing testing increases.&nbsp; It is impossible
to predict the actual point at which a given semiconductor will fail, thus
manufacturers monitor the failure rate statistically to determine the frequency
that gives an acceptable batch yield.&nbsp; <B><U>These failures are typically
unobservable and require a method of testing every gate on the chip, as
many failures may only be observable under very specific circumstances,
typically resulting in intermittent failures, although complete "meltdown"
due to a newly formed short is also possible.</U></B>&nbsp;&nbsp; If they
occur, the entire semiconductor must be rejected due to these failures
being irrepairable.&nbsp; As you exceed the rated frequency you are taking
a semiconductor that has passed a thourough test at its rated frequency
and entering the realm of statistical probability.&nbsp; Attempting to
find the maximum frequency is impossible, as by the time a failure is noticable
the semiconductor has already been permanently damaged.&nbsp; Cooling the
external package by using a heat sink and/or fan may increase the frequency
at which a semiconductor can operate; however, there is still no way to
determine the frequency at which a specific semiconductor will fail as
it can only be done statistically and practically undetectable without
being able to determine the proper operation of every gate on the semiconductor.&nbsp;
Semiconductors such as fast CPU's are rated with the required heat sink
and/or cooling fan in place.&nbsp; Aftermarket cooling devices are sold
as "performance coolers" due to the inability to determine the statistical
likelyhood of failure and the inability of the end user to simply reject
failed semiconductors.&nbsp; <B><U>Under no circumstances should a programmer
develop software that overclocks an end-user's hardware without the end
user being warned of the statistical likelyhood of failure.</U></B>&nbsp;
Making any claims about the safety of the software's operation can leave
the programmer with legal liability that cannot be excluded by disclaimer.</LI>

<LI>
<B><U>Disclaimer</U>: The author presents this information as-is without
any warranty, including suitability for intended purpose. The author is
not responsible for damages resulting by the use of the information, incidental
or otherwise. By utilizing this information, you as the programmer take
full liability for any damages caused by your use of this information.
If you are not satisfied with these terms, then your only recourse is to
not use this information. While every reasonable effort is made to ensure
that this information is correct, the possibility exists for error and
is not guaranteed for accuracy, and disclaims liability for any changes,
errors or omissions and is not responsible for any damages that may arise
from the use or misuse of this information.&nbsp; License to use this information
is only granted where this disclaimer applies in whole.</B></LI>
</UL>
<A NAME="feedback"></A><B>Feedback</B>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I can be reached online
via the <A HREF="feedback.htm">Feedback Form</A>.&nbsp; Consider it your
moral obligation to send feedback about the page, including inaccuracies,
confusing parts, missing info, questions/answers and other feedback type
thingies.
<BR>&nbsp;

<P>Notice: All trademarks used or referred to on this page are the property
of their respective owners.
<BR>All pages are Copyright &copy; 1997, 1998, J. D. Neal, except where
noted. Permission for utilization and distribution is subject to the terms
of the <A HREF="license.htm">FreeVGA Project Copyright License</A>.&nbsp;<IMG SRC="http://www.goodnet.com/~tinara/cgi-bin/imgserv.cgi?logo.gif" >
</BODY>
</HTML>
